package org.sharing.design.factory.impl;

import com.alibaba.fastjson.JSON;
import org.sharing.design.factory.AwardService;
import org.sharing.design.factory.shop.coupon.CouponResult;
import org.sharing.design.factory.shop.coupon.CouponService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;

/**
 * @author: Dragon
 * @since: 2024/4/6 12:44
 */
public class CouponAwardServiceImpl implements AwardService {

    private Logger logger = LoggerFactory.getLogger(CouponAwardServiceImpl.class);

    private CouponService couponService = new CouponService();
    @Override
    public void sendAward() {
        CouponResult couponResult = couponService.sendCoupon();
        logger.info("发放优惠券");
        logger.info("测试结果：{}", JSON.toJSONString(couponResult));
    }
}
